#!/bin/sh

make clean;
make;
#task4

if [ ! -d "task4" ]; then
	mkdir task4
else
	rm -rf task4/*
fi

for rho in 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95
do
	for((n=0;n<30;n++))
	do
		echo 'Run' $n 'for rho = '$rho
		./queuesimulation $rho 40 100000 10 >> task4/output_task4
	done
done

grep 'Average waiting time*' task4/output_task4 | awk '{print $5}' >> task4/waiting.result

